<?php if ($position == 'content_bottom' or $position == 'content_top') { ?>
<div class="box hide-phone">

	<?php $i = 0; foreach ($products as $product) { $i++; } ?>
			<?php if ($i > 8)  { ?>
				<ul class="btnlatest">
					
					<li><a href="javascript:;" class="prev"></a></li>
					<?php $fcounter = ceil($i/8); ?>
					<?php for( $s = 1; $s <= $fcounter; $s++ ) { ?>
					<li class="number"><a href="javascript:;" rel="<?php echo $s; ?>"></a></li>
					<?php } ?>
					<li><a href="javascript:;" class="next"></a></li>
				
				</ul>
			<?php } ?>	
	
	<div class="box-heading"><?php echo $heading_title; ?></div>
		<div class="box-content">
			<div class="box-product">
				<?php foreach ($products as $product) { ?>
					<div class=" latest mask">
						<?php if ($product['thumb']) { ?>
							<div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
						<?php } ?>
						<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
						<div class="rating"><img src="catalog/view/theme/bistro/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
						<div class="description"><?php echo $product['description']; ?></div>
				
						<div class="mask-hover">
							<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
							
							<div class="price">
							  <?php if (!$product['special']) { ?>
							  <?php echo $product['price']; ?>
							  <?php } else { ?>
							   <span class="price-old"><?php echo $product['price']; ?></span> 
							  <span class="price-new"><?php echo $product['special']; ?></span>
							 
							  <?php } ?>
							</div>
							
							<div class="cart"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="btn btn-primary btn-general button" /></div>
							<a href="" class="addtowishlist" title="<?php echo $button_wishlist; ?>" onclick="addToWishList('<?php echo $product['product_id']; ?>'); return false;"></a>
							<div class="border"></div>
							<a href="" class="addtocompare" title="<?php echo $button_compare; ?>" onclick="addToCompare('<?php echo $product['product_id']; ?>'); return false;"></a>
						</div>	
							
					</div>
				<?php } ?>
			</div>
		</div>
</div>

<?php } else if ($position == 'column_left' or $position == 'column_right') { ?>  

<div class="widget">
                    <h2 class="widget-title"><span><?php echo $heading_title; ?></span></h2>
                    <div class="sidebar-line"><span></span></div>
                        <div class="for-womans flexslider flex-direction-nav-on-top">
                            
                        <div class="flex-viewport">
                        <ul  class="slides">
                        
                        <?php $i = 0; foreach ($products as $product) { ?>
                        <li class="clone">
                                    <div class="wdt-product">
                                        <div class="wdt-products-wrapper">
                                            <div class="wdt-product active show">
                                             <?php if ($product['thumb']) { ?>
									        <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a>
									        <?php } ?>
									       
                                            <h4> <a href="<?php echo $product['href']; ?>" title="<?php echo $product['name']; ?>"><?php echo $product['name']; ?></a></h4>
                                            <div class="wdt-pricing">
                                            <span class="amount"><?php echo $product['price']; ?></span>
                                            </div>
                                            <div class="wdt-cart">
                                            <div class="wdt-cart-bar">
                                            <a href="javascript:;" onclick="addToCart('<?php echo $product['product_id']; ?>');" title="<?php echo $product['name']; ?>"><i class="icon-shopping-cart"></i><?php echo $button_cart; ?></a>
                                            </div>
                                            </div>
                                            <div class="wdt-overlay">
                                            <span class="amount"><?php echo $product['price']; ?></span>
                                            </div>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <?php } ?>
                                </ul></div><ul class="flex-direction-nav"><li><a class="flex-prev" href="#">Previous</a></li><li><a class="flex-next" href="#">Next</a></li></ul></div>
                </div>
 <?php } ?>

 <?php if ($position == 'content_bottom' or $position == 'content_top')  { ?>

<div class="box hide-desktop show-phone">


		<div class="box-heading"><?php echo $heading_title; ?></div>
		<div class="box-content">
		<div class="box-product">
		
	
		<?php foreach ($products as $product) {?>
      <div>
		<?php if ($product['price'] && $product['special']) { ?>
							<span class="onsale hide-phone">  </span>
		<?php } ?>
        <?php if ($product['thumb']) { ?>
        <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
        <?php } ?>

        <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>

		<div class="rating"><img src="catalog/view/theme/bistro/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
        <?php if ($product['price']) { ?>
        <div class="price">
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
          <?php } ?>
        </div>
        <?php } ?>

        

        <div class="cart"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="btn btn-primary btn-general button" /></div>
      </div>
	 
    <?php } ?>
    </div>
  </div>
</div>

<?php } ?>
